import {view, ViewGroup, handler, binder} from "adajs";
import LifeService from "./state.js";
import Bar from "../../../controls/bar";

@view({
    className: "mylife",
    template: "./template.html",
    style: "./style.scss",
    dataset: {
        service: LifeService
    }
})
class Life extends ViewGroup {
    tags() {
        return {
            bar: Bar
        }
    }

    @binder("gotoPage")
    gotoPage({link}) {
        this.dispatchEvent("gotoPage", link.link);
    }
}

export default Life;